--- /dev/null
+#!/usr/bin/env python3
+
+import os, sys
+from pathlib import Path
+from xml.etree.ElementTree import ElementTree
+import argparse
+
+def check_version(version, file, type='news'):
+ if type == 'news':
+ line = file.open().readline()
+ ok = line.startswith(version)
+ print("{}: {}".format(file, "OK" if ok else "FAILED"))
+ if not ok:
+ raise Exception("{} does not start with {}".format(file, version))
+ elif type == 'metainfo':
+ query = './releases/release[@version="{}"]'.format(version)
+ ok = ElementTree(file=file).find(query) is not None
+ print("{}: {}".format(file, "OK" if ok else "FAILED"))
+ if not ok:
+ raise Exception("{} does not contain release {}".format(file, version))
+ else:
+ raise Exception('Not implemented')
+
+parser = argparse.ArgumentParser(description='Check release version information.')
+parser.add_argument('--type', choices=['metainfo','news'], default='news')
+parser.add_argument('version', help='the version to check for')
+parser.add_argument('files', nargs='+', help='files to check')
+args = parser.parse_args()
+
+distroot = os.environ.get('MESON_DIST_ROOT', './')
+
+try:
+ for file in args.files:
+ check_version(args.version, Path(distroot, file), args.type)
+except:
+ sys.exit(1)
--- /dev/null
+#!/usr/bin/env python3
+
+import argparse
+
+def read_app_ids(path) -> str:
+ ids = []
+ with open(path, "r") as file:
+ for line in file:
+ # strip comments
+ line, _, _ = line.partition('#');
+ line = line.strip()
+ if len(line) > 0:
+ ids.append(line)
+ return ids
+
+def print_as_array(ids):
+ mapped_ids = list(map(lambda i: f" '{i}'", ids))
+ print('[')
+ print(',\n'.join(mapped_ids))
+ print(']')
+
+def print_as_pages(ids):
+ mapped_ids = []
+ for i, id in enumerate(ids):
+ mapped_ids.append(f" '{id}': <{{'position': <{i}>}}>")
+
+ print('[{')
+ print(',\n'.join(mapped_ids))
+ print('}]')
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--pages', action='store_true')
+parser.add_argument('file')
+args = parser.parse_args()
+
+ids = read_app_ids(args.file)
+if args.pages:
+ print_as_pages(ids)
+else:
+ print_as_array(ids)
--- /dev/null
+#!/usr/bin/env python3
+
+import os
+from pathlib import PurePath
+import subprocess
+
+stylesheets = [
+ 'data/theme/gnome-shell-high-contrast.css',
+ 'data/theme/gnome-shell-dark.css',
+ 'data/theme/gnome-shell-light.css'
+]
+
+sourceroot = os.environ.get('MESON_SOURCE_ROOT')
+distroot = os.environ.get('MESON_DIST_ROOT')
+
+for stylesheet in stylesheets:
+ stylesheet_path = PurePath(stylesheet)
+ src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss'))
+ dst = PurePath(distroot, stylesheet_path)
+ subprocess.run(['sassc', '-a', src, dst], check=True)
mutter_typelibdir = mutter_dep.get_variable('typelibdir')
python = find_program('python3')
gjs = find_program('gjs')
-generate_app_list = find_program('meson/generate-app-list.py')
+generate_app_list = find_program('build-aux/generate-app-list.py')
cc = meson.get_compiler('c')
gtk_update_icon_cache: true
)
-meson.add_dist_script('meson/generate-stylesheets.py')
-meson.add_dist_script('meson/check-version.py', meson.project_version(), 'NEWS')
+meson.add_dist_script('build-aux/generate-stylesheets.py')
+meson.add_dist_script('build-aux/check-version.py', meson.project_version(), 'NEWS')
summary_options = {
'x11': have_x11,
+++ /dev/null
-#!/usr/bin/env python3
-
-import os, sys
-from pathlib import Path
-from xml.etree.ElementTree import ElementTree
-import argparse
-
-def check_version(version, file, type='news'):
- if type == 'news':
- line = file.open().readline()
- ok = line.startswith(version)
- print("{}: {}".format(file, "OK" if ok else "FAILED"))
- if not ok:
- raise Exception("{} does not start with {}".format(file, version))
- elif type == 'metainfo':
- query = './releases/release[@version="{}"]'.format(version)
- ok = ElementTree(file=file).find(query) is not None
- print("{}: {}".format(file, "OK" if ok else "FAILED"))
- if not ok:
- raise Exception("{} does not contain release {}".format(file, version))
- else:
- raise Exception('Not implemented')
-
-parser = argparse.ArgumentParser(description='Check release version information.')
-parser.add_argument('--type', choices=['metainfo','news'], default='news')
-parser.add_argument('version', help='the version to check for')
-parser.add_argument('files', nargs='+', help='files to check')
-args = parser.parse_args()
-
-distroot = os.environ.get('MESON_DIST_ROOT', './')
-
-try:
- for file in args.files:
- check_version(args.version, Path(distroot, file), args.type)
-except:
- sys.exit(1)
+++ /dev/null
-#!/usr/bin/env python3
-
-import argparse
-
-def read_app_ids(path) -> str:
- ids = []
- with open(path, "r") as file:
- for line in file:
- # strip comments
- line, _, _ = line.partition('#');
- line = line.strip()
- if len(line) > 0:
- ids.append(line)
- return ids
-
-def print_as_array(ids):
- mapped_ids = list(map(lambda i: f" '{i}'", ids))
- print('[')
- print(',\n'.join(mapped_ids))
- print(']')
-
-def print_as_pages(ids):
- mapped_ids = []
- for i, id in enumerate(ids):
- mapped_ids.append(f" '{id}': <{{'position': <{i}>}}>")
-
- print('[{')
- print(',\n'.join(mapped_ids))
- print('}]')
-
-parser = argparse.ArgumentParser()
-parser.add_argument('--pages', action='store_true')
-parser.add_argument('file')
-args = parser.parse_args()
-
-ids = read_app_ids(args.file)
-if args.pages:
- print_as_pages(ids)
-else:
- print_as_array(ids)
+++ /dev/null
-#!/usr/bin/env python3
-
-import os
-from pathlib import PurePath
-import subprocess
-
-stylesheets = [
- 'data/theme/gnome-shell-high-contrast.css',
- 'data/theme/gnome-shell-dark.css',
- 'data/theme/gnome-shell-light.css'
-]
-
-sourceroot = os.environ.get('MESON_SOURCE_ROOT')
-distroot = os.environ.get('MESON_DIST_ROOT')
-
-for stylesheet in stylesheets:
- stylesheet_path = PurePath(stylesheet)
- src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss'))
- dst = PurePath(distroot, stylesheet_path)
- subprocess.run(['sassc', '-a', src, dst], check=True)
-../../../../meson/check-version.py
\ No newline at end of file
+../../../../build-aux/check-version.py
\ No newline at end of file